Skip to content

fix: set provider_id and model_id on FauxProvider streamed messages - #43

Merged
xfgong merged 1 commit into
mainfrom
fix/faux-provider-metadata
May 10, 2026
Merged

fix: set provider_id and model_id on FauxProvider streamed messages#43
xfgong merged 1 commit into
mainfrom
fix/faux-provider-metadata

Conversation

@xfgong

@xfgong xfgong commented May 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • FauxProvider now sets provider_id and model_id on streamed AssistantMessage objects, matching the behavior of real providers (e.g., Anthropic).
  • The metadata is propagated both to partial events during streaming and to the final result message.
  • Two new tests verify the fix on both the final result and partial stream events.

Closes #37

Test plan

  • test_provider_metadata_set verifies provider_id and model_id on the final streamed result
  • test_provider_metadata_on_partial_events verifies the fields on the start event's partial message
  • Full test suite passes (289 tests, 0 failures)
  • Ruff check and format pass

@xfgong
xfgong merged commit 86eb6ad into main May 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FauxProvider does not set provider_id/model_id on streamed messages

1 participant